import request from '@/utils/request'

// 查询蛋糕列表
export function listCake(query) {
  return request({
    url: '/cake/cake/list',
    method: 'get',
    params: query
  })
}

// 查询蛋糕详细
export function getCake(id) {
  return request({
    url: '/cake/cake/' + id,
    method: 'get'
  })
}

// 新增蛋糕
export function addCake(data) {
  return request({
    url: '/cake/cake',
    method: 'post',
    data: data
  })
}

// 修改蛋糕
export function updateCake(data) {
  return request({
    url: '/cake/cake',
    method: 'put',
    data: data
  })
}

// 删除蛋糕
export function delCake(id) {
  return request({
    url: '/cake/cake/' + id,
    method: 'delete'
  })
}
